<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";


%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>login</title>
<link href="<%=path %>/style/MainLogin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
		function checkNull(){
			var user_name = document.forms[0].user_name;
			if(user_name.value==''){
				alert("请输入用户名！");
				user_name.focus();
				return false;
				}
			var password = document.forms[0].password;
			if(password.value==''){
				alert("请输入密码！");
				password.focus();
				return false;
				}
			}
	</script>
</head>

<body>
<%
if(request.getAttribute("error") != null){
	out.println(request.getAttribute("error").toString());
}
%>
<div id="Wrap">
<form action="loginAction.do?method=login" method="post" onsubmit="return checkNull();">
	<div id="WrapLogin">    
    	<ul>
        	<li>用户名</li>
            <li><input name="user_name" type="text" size="20" class="InputStyle" /></li>
        </ul>
        <ul>
        	<li>密&nbsp;&nbsp;码</li>
            <li><input name="password" type="password" size="20"  class="InputStyle" /></li>
            <li class="Enter"><input type="image" src="images/enter.gif" alt="登录"  /></li>
        </ul>
    </div>
</form>
</div>
</body>
</html>
